<template>
  <div>
    <!-- 文章列表 -->
    <ArticleList :articles="articleList"/>
     <!-- 页码 -->
    <Pagination :totalArticle="totalArticle" :pageSize="pageSize" :currentPage="currentPage" @pageActiveClick="pageActiveClick"/>
  </div>
</template>

<script>
import ArticleList from "../../components/ArticleList";
import { getArticle, changePage } from "../../utils/mixin";
import Pagination from '../../components/Pagination'
export default {
  name: "FavArticlesPages",
  mixins: [getArticle, changePage],
  data() {
    return {};
  },
  methods: {
    pageActiveClick(i){
      this.pageActive(i)
      // 重新发送请求
      this.getUserArtical()
    }
  },
  created() {
    this.article.favorited = this.$route.params.uid
    this.pageSize = 5
    this.getUserArtical();
  },
  components: {
    ArticleList,
    Pagination
  }
};
</script>
<style lang="less" scoped></style>
